package com.itfreer.data.general;

/**
 * 类功能说明 表空间类型
 */
public enum WorkspaceType {

	/**
	 * Sqlite数据库
	 */
	Sqlite(1);

	private final int workspaceType;

	public int getWorkspaceType() {
		return workspaceType;
	}

	private WorkspaceType(int workspaceTypeId) {
		this.workspaceType = workspaceTypeId;
	}

	// 通过workspaceTypeId返回 workspaceType
	public static WorkspaceType getWorkspaceTypeByTypeId(int workspaceTypeId) {
		for (WorkspaceType workspaceType : values()) {
			if (workspaceType.getWorkspaceType() == workspaceTypeId) {
				return workspaceType;
			}
		}
		return null;
	}
}